<?php $objDef = new objectDef('dossier')?>
<fieldset>
	<legend><?php echo __('Process : '). $demande->type->classdossier->description . ' -> ' . $demande->type->description . ' -> ' . $demande->categorie->description ?></legend>
	<table>
		<tr>
			<th width="50%"><?php echo $objDef->renderLabel('id') ?></th> 
			<td width="50%"><?php echo $demande->id ?></td>
		</tr>
		<tr>
			<th><?php echo $objDef->renderLabel('dateDossier') ?></th>
			<td><?php echo format_date($demande->dateDossier, 'dd/MM/yyyy') ?></td>
		</tr>
		<tr>
			<th><?php echo $objDef->renderLabel('type') ?></th>
			<td><?php echo $demande->type->description ?></td>
		</tr>
		<tr>
			<th><?php echo $objDef->renderLabel('categorie') ?></th>
			<td><?php echo $demande->categorie->description ?></td>
		</tr>
		<?php if($demande->external_id!=''):?>
		<tr>
			<th><?php echo $objDef->renderLabel('external_id') ?></th>
			<td><?php echo $demande->external_id ?></td>
		</tr>
		<?php endif;?>
		<tr>
			<th><?php echo $objDef->renderLabel('demandeur') ?></th>
			<td><?php echo $demande->demandeur->name ?></td>
		</tr>
		<?php $persObjDef = new objectDef('personne')?>
		<tr>
			<th><?php echo $objDef->renderLabel('demandeur') .' - '. $persObjDef->renderLabel('tel') ?></th>
			<td><?php if(function_exists('format_phone'))
					{
						echo format_phone($demande->demandeur->tel, '00 00 00 00 00');
					}else{
						echo $demande->demandeur->tel; 
					}
					 ?></td>
		</tr>
		<tr>
			<th><?php echo $objDef->renderLabel('demandeur') .' - '. $persObjDef->renderLabel('email') ?></th>
			<td><?php echo $demande->demandeur->email ?></td>
		</tr>
		<tr>
			<th><?php echo $objDef->renderLabel('client')?></th>
			<td><?php echo $demande->getNameClient() ?></td>
		</tr>
		<tr>
			<th><?php echo $objDef->renderLabel('telClient')?></th>
			<td><?php if(function_exists('format_phone'))
					{
						echo format_phone($demande->telClient, '00 00 00 00 00');
					}else{
						echo $demande->telClient; 
					}?></td>
		</tr>
		<tr>
			<th><?php echo $objDef->renderLabel('mailClient')?></th>
			<td><?php echo $demande->mailClient ?></td>
		</tr>
		<tr>
			<th><?php echo $objDef->renderLabel('regionClient')?></th>
			<td><?php echo $demande->regionClient->nom ?></td>
		</tr>	
		<tr>
			<th><?php echo $objDef->renderLabel('departementClient')?></th>
			<td><?php echo $demande->departementClient->nom ?></td>
		</tr>			
		<tr>
			<th><?php echo $objDef->renderLabel('dateRealSouhaitee')?></th>
			<td><?php echo $demande->getDateRealSouhaitee2(); ?></td>
		</tr>
		<tr>
			<th><?php echo $objDef->renderLabel('delaiStandar')?></th>
			<td><?php echo $demande->delaiStandar ?></td>
		</tr>
		<tr>
			<th><?php echo $objDef->renderLabel('dateReference')?></th>
			<td><?php echo format_date($demande->dateReference, 'dd/MM/yyyy') ?></td>
		</tr>
		    <?php $obj = $demande->getObject()?>
		    <?php if($demande->urgent):?>
			<tr>
				<th><?php echo __('This process is urgent')?></th>
      			<td><?php echo nl2br($obj->justifurgence) ?></td>
			</tr>
			<?php endif;?>
	</table>
</fieldset>